Skip to content

Full sweep: bug fixes, country metadata, 14 languages, API improvements#1

Merged
Merkost merged 16 commits into
mainfrom
refactoring
Mar 25, 2026
Merged

Full sweep: bug fixes, country metadata, 14 languages, API improvements#1
Merkost merged 16 commits into
mainfrom
refactoring

Conversation

@Merkost
Copy link
Copy Markdown
Member

@Merkost Merkost commented Mar 24, 2026

Summary

  • Fix critical bugs: Broken CI workflows (:deci: refs), hardcoded VERSION, FlagEmoji validation, data inaccuracies (Turkey/Belgium/Peru), orphaned Kosovo translations, SDK version mismatches
  • Extend Country model: Added continent, region, calling code, currency, and timezone to all 249 countries with new Continent/Region enums and CallingCode/CurrencyCode/TimezoneId value classes
  • Complete i18n: Added 7 new languages (JA, PT, HI, KO, IT, TR, ID), completed Chinese translation gaps, locale string normalization ("en-US", "ES" no longer crash)
  • Improve query API: CountriesQueryResult implements Iterable, @DslMarker annotation, not{} combinator, fixed or{}/nameContains("") edge cases
  • Update sample app: New country fields in detail dialog, 14 languages in picker
  • Update READMEs: Full documentation of new features and API surface

Merkost and others added 15 commits March 24, 2026 09:28
…8n, API polish)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sprints)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eckout@v6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oding

Adds a Gradle task that writes BuildKConfig.kt into the build directory
with the version read from libs.versions.kcountries, keeping Countries.VERSION
in sync with the published artifact version automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the length-in-4..8 check with de.cketti.codepoints validation that
requires exactly 2 regional indicator codepoints (U+1F1E6..U+1F1FF), rejecting
ASCII strings like "ABCD" that previously passed the length check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…slations, fix SDK versions and Locale annotation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…imezone and populate all 249 entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…region, calling code, currency, timezone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…continent, region, timezone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, update tests for 13 locales

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…or{}/nameContains edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 24, 2026 02:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR delivers a broad KCountries “full sweep” update: it fixes CI/build issues, extends the Country model with richer geographic/telecom/financial metadata, expands i18n coverage to 13 translation locales (plus EN fallback), and improves the query DSL/API surface across KMP targets.

Changes:

  • Extend core model & APIs: add Continent/Region enums and CallingCode/CurrencyCode/TimezoneId value types; expose new repository methods, DSL predicates, and string extensions.
  • Expand i18n: add 7 new translation locales (JA/PT/HI/KO/IT/TR/ID), fill ZH gaps, normalize string locale inputs, and tighten translation completeness tests.
  • Operational/docs/sample updates: fix CI workflows, generate Countries.VERSION from the version catalog, update sample UI and READMEs accordingly.

Reviewed changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sample/src/commonMain/kotlin/org/kimplify/sample/App.kt Adds new locales to picker, updates language count, and displays new country metadata fields.
gradle/libs.versions.toml Updates dependency/plugin versions in the version catalog.
docs/superpowers/specs/2026-03-24-kcountries-full-sweep-design.md Adds a design spec documenting the intended multi-sprint changes.
docs/superpowers/plans/2026-03-24-kcountries-full-sweep.md Adds an implementation plan for the full sweep work.
countries-i18n/src/commonTest/kotlin/org/kimplify/countries/i18n/TranslationTest.kt Updates tests for 13 locales, locale normalization, and full 249-coverage assertions.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/extensions/CountryI18nExtensions.kt Normalizes locale strings like es-MX/PT_BR and adds graceful fallback behavior.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/TurkishTranslations.kt Adds TR translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/SpanishTranslations.kt Removes orphaned XK translation entry.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/RussianTranslations.kt Removes orphaned XK translation entry.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/PortugueseTranslations.kt Adds PT translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/KoreanTranslations.kt Adds KO translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/JapaneseTranslations.kt Adds JA translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ItalianTranslations.kt Adds IT translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/IndonesianTranslations.kt Adds ID translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/HindiTranslations.kt Adds HI translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/GermanTranslations.kt Removes orphaned XK translation entry.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/FrenchTranslations.kt Removes orphaned XK translation entry.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ChineseTranslations.kt Removes XK and fills missing CN/HK/MO/SG/TW translations.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ArabicTranslations.kt Removes orphaned XK translation entry.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/Locale.kt Adds new locale constants and normalizes annotation import style.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/CountryTranslations.kt Registers new locale maps and normalizes string locale inputs for lookups.
countries-i18n/build.gradle.kts Aligns Android SDK values with the version catalog.
countries-i18n/README.md Updates module docs to reflect new locales, normalization behavior, and coverage.
countries-core/src/commonTest/kotlin/org/kimplify/countries/testdata/TestCountries.kt Updates test fixtures to include new required Country fields.
countries-core/src/commonTest/kotlin/org/kimplify/countries/repository/CountriesRepositoryTest.kt Adds repository method tests for continent/region/calling code/currency queries.
countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryMetadataValidationTest.kt Adds validation tests for new metadata value classes.
countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryCodesValidationTest.kt Tightens FlagEmoji validation expectations (codepoint-based).
countries-core/src/commonTest/kotlin/org/kimplify/countries/extensions/CountryExtensionsTest.kt Adds tests for new string metadata extension properties.
countries-core/src/commonTest/kotlin/org/kimplify/countries/dsl/CountriesQueryTest.kt Adds tests for new DSL predicates, iterable results, not {}, and edge cases.
countries-core/src/commonMain/kotlin/org/kimplify/countries/repository/CountriesRepository.kt Adds repository API for new metadata and corresponding indices in in-memory repo.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Region.kt Adds Region enum (UN geoscheme-based).
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryMetadata.kt Adds CallingCode, CurrencyCode, and TimezoneId value classes with validation.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryCodes.kt Updates FlagEmoji validation to use Unicode codepoints.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Country.kt Extends Country with continent/region/callingCode/currency/timezone fields.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Continent.kt Adds Continent enum.
countries-core/src/commonMain/kotlin/org/kimplify/countries/extensions/CountryExtensions.kt Adds string extensions for new metadata fields.
countries-core/src/commonMain/kotlin/org/kimplify/countries/dsl/CountriesQuery.kt Adds @DslMarker, new predicates, not {}, iterable results, and edge case guards.
countries-core/src/commonMain/kotlin/org/kimplify/countries/Countries.kt Switches Countries.VERSION to be generated via BuildKConfig.
countries-core/build.gradle.kts Adds version-file generation task and aligns Android SDK values to the version catalog.
README.md Updates top-level docs for new metadata, expanded i18n, and DSL/API changes.
.github/workflows/publish.yml Updates checkout action version in publish workflow.
.github/workflows/build.yml Fixes CI task paths, runs both modules’ tests, and updates artifact upload paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sample/src/commonMain/kotlin/org/kimplify/sample/App.kt
Comment thread countries-i18n/README.md
Comment thread countries-core/build.gradle.kts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Merkost Merkost requested a review from diogocavaiar March 24, 2026 04:35
@Merkost Merkost merged commit ec000e2 into main Mar 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants